﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ListVersion : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BinData();
        }
    }

    private void BinData()
    {
        string v_str_donviID = Request.QueryString["donviId"];
        int v_int_donviID = 0;
        int.TryParse(v_str_donviID, out v_int_donviID);

        string v_str_nganhID = Request.QueryString["nganhId"];
        int v_int_nganhID = 0;
        int.TryParse(v_str_nganhID, out v_int_nganhID);

        string v_str_monhocID = Request.QueryString["monhocId"];
        int v_int_monhocID = 0;
        int.TryParse(v_str_monhocID, out v_int_monhocID);

        gvVersion.PageSize = 10;
        gvVersion.DataSource = Services.GetGDPhienBan(v_int_donviID,v_int_nganhID, v_int_monhocID);
        gvVersion.DataBind();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Admin/VersionAdd.aspx");

    }
}